﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Koopakiller.Numerics
{
    /// <summary>
    /// The exception that is thrown when the value of two properties from two arguments are different.
    /// </summary>
    public sealed class ArgumentDifferentException : ArgumentException
    { 
        #region .ctor

        /// <summary>
        /// Initializes a new instance of the <see cref="ArgumentDifferentException"/> class.
        /// </summary>
        public ArgumentDifferentException() : base() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ArgumentDifferentException"/> class.
        /// </summary>
        /// <param name="message">A message for the exception.</param>
        public ArgumentDifferentException(string message) : base(message) { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ArgumentDifferentException"/> class.
        /// </summary>
        /// <param name="message">A message for the exception.</param>
        /// <param name="parameter1">The name of the first false argument.</param>
        /// <param name="parameter2">The name of the second false argument.</param>
        public ArgumentDifferentException(string message, string parameter1, string parameter2)
            : base(message, parameter1 + " / " + parameter2)
        {
            this.Argument1 = parameter1;
            this.Argument2 = parameter2;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ArgumentDifferentException"/> class.
        /// </summary>
        /// <param name="message">A message for the exception.</param>
        /// <param name="innerException">The exception that is the cause of the current exception.</param>
        public ArgumentDifferentException(string message, Exception innerException) : base(message, innerException) { }

        /// <summary>
        /// Initializes a new instance of the <see cref="ArgumentDifferentException"/> class.
        /// </summary>
        /// <param name="message">A message for the exception.</param>
        /// <param name="parameter1">The name of the first false argument.</param>
        /// <param name="parameter2">The name of the second false argument.</param>
        /// <param name="value1">The value of the first false argument.</param>
        /// <param name="value2">The value of the second false argument.</param>
        public ArgumentDifferentException(string message, string parameter1, string parameter2, object value1, object value2)
            : base(message, parameter1 + " / " + parameter2)
        {
            this.Argument1 = parameter1;
            this.Argument2 = parameter2;
            this.Value1 = value1;
            this.Value2 = value2;
        }

        #endregion

        #region properties

        /// <summary>
        /// Gets the name of the first false argument.
        /// </summary>
        public string Argument1{get;private set;}
        /// <summary>
        /// Gets the name of the second false argument.
        /// </summary>
        public string Argument2 { get; private set; }

        /// <summary>
        /// Gets the value of the first false argument.
        /// </summary>
        public object Value1 { get; private set; }
        /// <summary>
        /// Gets the value of the second false argument.
        /// </summary>
        public object Value2{get;private set;}

        #endregion
    }
}
